package com.bhs.mappers.Product;

import com.bhs.pojo.Item;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ProductMapper {
    @Select("SELECT id,menu_id,name,price,img_path,created,updated,status,top_menu_id,repertory,advantage " +
            "FROM item " +
            "WHERE id=#{id}")
    Item getDetails(Integer id);
    @Select("SELECT id,menu_id,name,price,img_path,created,updated,status,top_menu_id,repertory,advantage " +
            "FROM item " +
            "WHERE main_menu_id=1")
    List<Item> getGoodsList1();
    @Select("SELECT id,menu_id,name,price,img_path,created,updated,status,top_menu_id,repertory,advantage " +
            "FROM item " +
            "WHERE main_menu_id=2")
    List<Item> getGoodsList2();
    @Select("SELECT id,menu_id,name,price,img_path,created,updated,status,top_menu_id,repertory,advantage " +
            "FROM item " +
            "WHERE main_menu_id=3")
    List<Item> getGoodsList3();
    @Select("SELECT id,menu_id,name,price,img_path,created,updated,status,top_menu_id,repertory,advantage " +
            "FROM item " +
            "WHERE main_menu_id=4")
    List<Item> getGoodsList4();
    @Select("SELECT id,menu_id,name,price,img_path,created,updated,status,top_menu_id,repertory,advantage " +
            "FROM item " +
            "WHERE main_menu_id=5")
    List<Item> getGoodsList5();
    @Select("SELECT id,menu_id,name,price,img_path,created,updated,status,top_menu_id,repertory,advantage " +
            "FROM item " +
            "WHERE main_menu_id in (6,7)")
    List<Item> getGoodsList6();
}
